\hypertarget{group__lowlevel}{\subsection{Low level register access}
\label{group__lowlevel}\index{Low level register access@{Low level register access}}
}
\subsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
uint32\-\_\-t \hyperlink{group__lowlevel_ga5f242135f5088f8c319492426a1ed5e3}{bcm2835\-\_\-peri\-\_\-read} (volatile uint32\-\_\-t $\ast$paddr)
\item 
uint32\-\_\-t \hyperlink{group__lowlevel_ga0f541d0997978dd30f60231b64f10230}{bcm2835\-\_\-peri\-\_\-read\-\_\-nb} (volatile uint32\-\_\-t $\ast$paddr)
\item 
void \hyperlink{group__lowlevel_ga639da6963ab76e3109b9909f3a9e6171}{bcm2835\-\_\-peri\-\_\-write} (volatile uint32\-\_\-t $\ast$paddr, uint32\-\_\-t value)
\item 
void \hyperlink{group__lowlevel_ga1c158b76d194b94d0b2fb1488f9ff30e}{bcm2835\-\_\-peri\-\_\-write\-\_\-nb} (volatile uint32\-\_\-t $\ast$paddr, uint32\-\_\-t value)
\item 
void \hyperlink{group__lowlevel_ga01949a6285305f38ce0a47154e55c1b6}{bcm2835\-\_\-peri\-\_\-set\-\_\-bits} (volatile uint32\-\_\-t $\ast$paddr, uint32\-\_\-t value, uint32\-\_\-t mask)
\end{DoxyCompactItemize}


\subsubsection{Detailed Description}
These functions provide low level register access, and should not generally need to be used 

\subsubsection{Function Documentation}
\hypertarget{group__lowlevel_ga5f242135f5088f8c319492426a1ed5e3}{\index{Low level register access@{Low level register access}!bcm2835\-\_\-peri\-\_\-read@{bcm2835\-\_\-peri\-\_\-read}}
\index{bcm2835\-\_\-peri\-\_\-read@{bcm2835\-\_\-peri\-\_\-read}!Low level register access@{Low level register access}}
\paragraph[{bcm2835\-\_\-peri\-\_\-read}]{\setlength{\rightskip}{0pt plus 5cm}uint32\-\_\-t bcm2835\-\_\-peri\-\_\-read (
\begin{DoxyParamCaption}
\item[{volatile uint32\-\_\-t $\ast$}]{paddr}
\end{DoxyParamCaption}
)}}\label{group__lowlevel_ga5f242135f5088f8c319492426a1ed5e3}
Reads 32 bit value from a peripheral address The read is done twice, and is therefore always safe in terms of manual section 1.\-3 Peripheral access precautions for correct memory ordering 
\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em paddr} & Physical address to read from. See B\-C\-M2835\-\_\-\-G\-P\-I\-O\-\_\-\-B\-A\-S\-E etc. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the value read from the 32 bit register 
\end{DoxyReturn}
\begin{DoxySeeAlso}{See Also}
Physical Addresses 
\end{DoxySeeAlso}
\hypertarget{group__lowlevel_ga0f541d0997978dd30f60231b64f10230}{\index{Low level register access@{Low level register access}!bcm2835\-\_\-peri\-\_\-read\-\_\-nb@{bcm2835\-\_\-peri\-\_\-read\-\_\-nb}}
\index{bcm2835\-\_\-peri\-\_\-read\-\_\-nb@{bcm2835\-\_\-peri\-\_\-read\-\_\-nb}!Low level register access@{Low level register access}}
\paragraph[{bcm2835\-\_\-peri\-\_\-read\-\_\-nb}]{\setlength{\rightskip}{0pt plus 5cm}uint32\-\_\-t bcm2835\-\_\-peri\-\_\-read\-\_\-nb (
\begin{DoxyParamCaption}
\item[{volatile uint32\-\_\-t $\ast$}]{paddr}
\end{DoxyParamCaption}
)}}\label{group__lowlevel_ga0f541d0997978dd30f60231b64f10230}
Reads 32 bit value from a peripheral address without the read barrier You should only use this when your code has previously called \hyperlink{group__lowlevel_ga5f242135f5088f8c319492426a1ed5e3}{bcm2835\-\_\-peri\-\_\-read()} within the same peripheral, and no other peripheral access has occurred since. 
\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em paddr} & Physical address to read from. See B\-C\-M2835\-\_\-\-G\-P\-I\-O\-\_\-\-B\-A\-S\-E etc. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the value read from the 32 bit register 
\end{DoxyReturn}
\begin{DoxySeeAlso}{See Also}
Physical Addresses 
\end{DoxySeeAlso}
\hypertarget{group__lowlevel_ga01949a6285305f38ce0a47154e55c1b6}{\index{Low level register access@{Low level register access}!bcm2835\-\_\-peri\-\_\-set\-\_\-bits@{bcm2835\-\_\-peri\-\_\-set\-\_\-bits}}
\index{bcm2835\-\_\-peri\-\_\-set\-\_\-bits@{bcm2835\-\_\-peri\-\_\-set\-\_\-bits}!Low level register access@{Low level register access}}
\paragraph[{bcm2835\-\_\-peri\-\_\-set\-\_\-bits}]{\setlength{\rightskip}{0pt plus 5cm}void bcm2835\-\_\-peri\-\_\-set\-\_\-bits (
\begin{DoxyParamCaption}
\item[{volatile uint32\-\_\-t $\ast$}]{paddr, }
\item[{uint32\-\_\-t}]{value, }
\item[{uint32\-\_\-t}]{mask}
\end{DoxyParamCaption}
)}}\label{group__lowlevel_ga01949a6285305f38ce0a47154e55c1b6}
Alters a number of bits in a 32 peripheral regsiter. It reads the current valu and then alters the bits deines as 1 in mask, according to the bit value in value. All other bits that are 0 in the mask are unaffected. Use this to alter a subset of the bits in a register. The write is done twice, and is therefore always safe in terms of manual section 1.\-3 Peripheral access precautions for correct memory ordering 
\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em paddr} & Physical address to read from. See B\-C\-M2835\-\_\-\-G\-P\-I\-O\-\_\-\-B\-A\-S\-E etc. \\
\hline
\mbox{\tt in}  & {\em value} & The 32 bit value to write, masked in by mask. \\
\hline
\mbox{\tt in}  & {\em mask} & Bitmask that defines the bits that will be altered in the register. \\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See Also}
Physical Addresses 
\end{DoxySeeAlso}


Here is the call graph for this function\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{group__lowlevel_ga01949a6285305f38ce0a47154e55c1b6_cgraph}
\end{center}
\end{figure}


\hypertarget{group__lowlevel_ga639da6963ab76e3109b9909f3a9e6171}{\index{Low level register access@{Low level register access}!bcm2835\-\_\-peri\-\_\-write@{bcm2835\-\_\-peri\-\_\-write}}
\index{bcm2835\-\_\-peri\-\_\-write@{bcm2835\-\_\-peri\-\_\-write}!Low level register access@{Low level register access}}
\paragraph[{bcm2835\-\_\-peri\-\_\-write}]{\setlength{\rightskip}{0pt plus 5cm}void bcm2835\-\_\-peri\-\_\-write (
\begin{DoxyParamCaption}
\item[{volatile uint32\-\_\-t $\ast$}]{paddr, }
\item[{uint32\-\_\-t}]{value}
\end{DoxyParamCaption}
)}}\label{group__lowlevel_ga639da6963ab76e3109b9909f3a9e6171}
Writes 32 bit value from a peripheral address The write is done twice, and is therefore always safe in terms of manual section 1.\-3 Peripheral access precautions for correct memory ordering 
\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em paddr} & Physical address to read from. See B\-C\-M2835\-\_\-\-G\-P\-I\-O\-\_\-\-B\-A\-S\-E etc. \\
\hline
\mbox{\tt in}  & {\em value} & The 32 bit value to write \\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See Also}
Physical Addresses 
\end{DoxySeeAlso}
\hypertarget{group__lowlevel_ga1c158b76d194b94d0b2fb1488f9ff30e}{\index{Low level register access@{Low level register access}!bcm2835\-\_\-peri\-\_\-write\-\_\-nb@{bcm2835\-\_\-peri\-\_\-write\-\_\-nb}}
\index{bcm2835\-\_\-peri\-\_\-write\-\_\-nb@{bcm2835\-\_\-peri\-\_\-write\-\_\-nb}!Low level register access@{Low level register access}}
\paragraph[{bcm2835\-\_\-peri\-\_\-write\-\_\-nb}]{\setlength{\rightskip}{0pt plus 5cm}void bcm2835\-\_\-peri\-\_\-write\-\_\-nb (
\begin{DoxyParamCaption}
\item[{volatile uint32\-\_\-t $\ast$}]{paddr, }
\item[{uint32\-\_\-t}]{value}
\end{DoxyParamCaption}
)}}\label{group__lowlevel_ga1c158b76d194b94d0b2fb1488f9ff30e}
Writes 32 bit value from a peripheral address without the write barrier You should only use this when your code has previously called \hyperlink{group__lowlevel_ga639da6963ab76e3109b9909f3a9e6171}{bcm2835\-\_\-peri\-\_\-write()} within the same peripheral, and no other peripheral access has occurred since. 
\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em paddr} & Physical address to read from. See B\-C\-M2835\-\_\-\-G\-P\-I\-O\-\_\-\-B\-A\-S\-E etc. \\
\hline
\mbox{\tt in}  & {\em value} & The 32 bit value to write \\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See Also}
Physical Addresses 
\end{DoxySeeAlso}
